<?php
	echo form_open("c_challenge/update_task/$challenge_id") . PHP_EOL;
	
	echo "<p>UPDATE CHALLENGE TASK" . "</p>" . PHP_EOL;	
	
	echo validation_errors();
	
	echo $task_result;
?>

<p>
	<?php
		echo "<p>Challenge Name:<br />" . $challenge_name. "</p>" . PHP_EOL;	
	
		echo "<p>Challenge Abstract:<br />" . $challenge_abstract. "</p>" . PHP_EOL;
	
		echo "<p>Challenge Status:<br />" . $challenge_status. "</p>" . PHP_EOL;
	?>
</p>
	
<p>
	<?php
		echo "<p>Task Name:<br />" . form_input('vName', $task_name) . "</p>" . PHP_EOL;
	
		echo "<p>Task Description:<br />" . form_input('vDescription', $task_description) . "</p>" . PHP_EOL;
		
		
		echo form_submit('add_task', 'Add Task') . PHP_EOL;	
	?>
</p>
		
<p>
	<?php
		echo "<p>Task list: " . PHP_EOL;
	
		echo $task_table . PHP_EOL;
	?>
</p>	
	
<p>
	<?php
		if ($task_exists) 
		{
			$config = array(	'name'		=> 'delete_task',
								'value'		=> 'Delete Task',
								'onclick'	=> 'return confirm(\'Are you sure want to delete those tasks?\')'
								);
			
			echo form_submit($config);
		}
	?>
</p>	

</form>